package com.red.wood.module.system.web;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.red.wood.module.system.service.ProvinceService;

@Controller
@RequestMapping("/province")
public class ProvinceController {
	
	private static final Log log = LogFactory.getLog(ProvinceController.class);
	
	@Autowired
	private ProvinceService provinceService;
	
	@RequestMapping(value = "getList", method = RequestMethod.POST)
	@ResponseBody
	public List<Map<String, Object>> getList(){
		List<Map<String, Object>> list = new ArrayList<>(); 
		try{
			list = provinceService.getList();
		}catch(Exception e){
			log.error(e.getMessage(),e);
		}
		return list;
	}
}
